home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 May / PCWorld_2000-05_cd.bin / Software / TemaCD / povray / povwin3.exe / %MAINDIR% / Insert Menu / Shapes / mesh.txt < prev    next >
Encoding:
Text File  |  2000-04-06  |  1.2 KB  |  30 lines

  1. // triangle or smooth-triangle mesh FINITE (no CSG) shape
  2. // NOTE: Each triangle can be independently textured,
  3. //       remaining triangles get texture at bottom
  4. mesh // box example here
  5. {
  6.   /* top side */
  7.   triangle { <-2, 2, -2>, <2, 2, -2>, <2, 2, 2> texture { Red } }
  8.   triangle { <-2, 2, -2>, <-2, 2, 2>, <2, 2, 2> texture { Red } }
  9.   /* bottom side */
  10.   triangle { <-2, -2, -2>, <2, -2, -2>, <2, -2, 2> }
  11.   triangle { <-2, -2, -2>, <-2, -2, 2>, <2, -2, 2> }
  12.   /* left side */
  13.   triangle { <-2, -2, -2>, <-2, -2, 2>, <-2, 2, 2> }
  14.   triangle { <-2, -2, -2>, <-2, 2, -2>, <-2, 2, 2> }
  15.   /* right side */
  16.   triangle { <2, -2, -2>, <2, -2, 2>, <2, 2, 2> texture { Green } }
  17.   triangle { <2, -2, -2>, <2, 2, -2>, <2, 2, 2> texture { Green } }
  18.   /* front side */
  19.   triangle { <-2, -2, -2>, <2, -2, -2>, <-2, 2, -2> texture { Blue } }
  20.   triangle { <-2, 2, -2>, <2, 2, -2>, <2, -2, -2> texture { Blue } }
  21.   /* back side */
  22.   triangle { <-2, -2, 2>, <2, -2, 2>, <-2, 2, 2> }
  23.   triangle { <-2, 2, 2>, <2, 2, 2>, <2, -2, 2> }
  24.   texture
  25.   { // remaining triangles get this texture
  26.     pigment { color rgb<0.9, 0.9, 0.9> }
  27.     finish { ambient 0.2 diffuse 0.7 }
  28.   }
  29. }
  30.